package net.labdemo.entity;

import net.labdemo.common.entity.BaseEntity;
/**
 * 参考文档
 * @author xiaofanku
 * 20160609
 */
public class Refer extends BaseEntity<Refer>{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 锚点
	 */
	private String anchor;
	/**
	 * 文档地址
	 */
	private String url;

	public String getAnchor() {
		return anchor;
	}
	public void setAnchor(String anchor) {
		this.anchor = anchor;
	}

	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((anchor == null) ? 0 : anchor.hashCode());
		result = prime * result + ((url == null) ? 0 : url.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Refer other = (Refer) obj;
		if (anchor == null) {
			if (other.anchor != null)
				return false;
		} else if (!anchor.equals(other.anchor))
			return false;
		if (url == null) {
			if (other.url != null)
				return false;
		} else if (!url.equals(other.url))
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "Refer [ anchor=" + anchor + ", url=" + url + "]";
	}
	
}
